package com.example.discover.view

import androidx.compose.foundation.background
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.livedata.observeAsState
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.lifecycle.viewmodel.compose.viewModel
import com.example.discover.viewmodel.BookSummaryViewModel
import com.example.discover.viewmodel.BookViewModelFactory

@Composable
fun BookSummaryScreen(modifier: Modifier = Modifier.background(Color.Transparent),
                      viewModel: BookSummaryViewModel = viewModel(factory = BookViewModelFactory.instance)){

    val bookCount:Int by viewModel.bookCount.observeAsState(0)

    Text(text = "Android Count=$bookCount", modifier)
}
